#ifndef FASTBUFFERHANDLER_H
#define FASTBUFFERHANDLER_H
#include <QVector>

class FastBufferManager;

class FastBufferHandler
{
public:
    FastBufferHandler(int id, FastBufferManager *manager);
    void waitDataReady();
    void waitDataInit();
    void sendData();
    void recvData();
    void readFinish();
    void recordTimeout(long long ns);
    int id() const;
    QVector<double> &fastBuffer();
    QVector<long long> &timeCountRecord() { return m_timeCount; }

private:
    int m_id;
    FastBufferManager *m_manager;
    QVector<long long> m_timeCount; // 计时数据
    long long m_maxTimeCount;
    long long m_minTimeCount;
};

#endif // FASTBUFFERHANDLER_H
